package com.whsxt.mapper;

import com.whsxt.domain.Customer;
import com.whsxt.dto.CustomerDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    int insertSelective(Customer record);

    Customer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    /**
     * 查询客户的集合数据
     * @param customerDto
     * @return
     */
    List<Customer> selectPage(@Param("query") CustomerDto customerDto);

    /**
     * 批量删除客户的数据
     * @param ids
     * @return
     */
    int batchDelete(@Param("ids") List<Integer> ids);

    /**
     * 通过证件号查询客户的数量
     * @param idCard
     * @return
     */
    int selectCountByIdCard(@Param("idCard") String idCard);
}